package com.dcy.machine.model;

import com.dcy.machine.config.order.OrderStateMachineConfig;
import com.dcy.machine.enums.OrderStatus;
import lombok.Data;

/**
 * @Author：dcy
 * @Description:
 * @Date: 2021/11/9 16:39
 */
@Data
public class NewOrder implements MatchineObj<OrderStatus> {

    private String id;

    private String orderNo;

    private String name;

    /**
     * 状态
     */
    private String status;

    @Override
    public String matchineId() {
        return OrderStateMachineConfig.ORDER_STATE_MACHINE_ID;
    }

    @Override
    public String factoryName() {
        return OrderStateMachineConfig.ORDER_STATE_MACHINE_FACTORY_NAME;
    }

    @Override
    public String stateName() {
        return status;
    }

    @Override
    public Class<OrderStatus> machineStateEnum() {
        return OrderStatus.class;
    }
}
